package com.zhao.deepClone.useSerializable;

import com.zhao.deepClone.useSerializable.pojo.Dog;
import com.zhao.deepClone.useSerializable.pojo.Person;

//深拷贝
public class DeepClone {
    public static void main(String[] args) {
        Dog dog = new Dog("花花", 12);
        Person person = new Person("张三", dog);
        Person clone = (Person) person.clone();

        System.out.println(person == clone);
        System.out.println(clone.getPet() == person.getPet());

    }
}
